import { createApp, DirectiveBinding } from 'vue'
import App from './App.vue'
import router from "./router"
import "@/assets/systemCss/animate.css"
import "./assets/systemCss/public.scss"
import 'element-plus/lib/theme-chalk/index.css'
import { components, plugins } from "./utils/elementUiPlus/index"
// 引入路由拦截器
import "@/utils/ToolsClass/permission"
const app = createApp(App);

// 注册全局组件
import gyhComponent from "@/components/index";
import store from "@/store/index"

// 注册全局指令
import directives from '@/utils/ToolsClass/directives';

// 按需导入Element Plus组件和插件
components.forEach(component => {
  app.component(component.name, component)
})
plugins.forEach(plugin => {
  app.use(plugin)
})

app.use(store);
app.use(gyhComponent);
app.use(directives);
app.use(router);
app.mount('#app');
